package com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.PageInfo;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.po.DemoLeaveInfoPO;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.req.DemoLeaveInfoAddReqVO;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.req.DemoLeaveInfoCompleteReqVO;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.req.DemoLeaveInfoListDoneTaskReqVO;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.req.DemoLeaveInfoListLaunchTaskReqVO;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.req.DemoLeaveInfoListReqVO;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.req.DemoLeaveInfoListTodoTaskReqVO;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.req.DemoLeaveInfoUpdateReqVO;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.resp.DemoLeaveInfoDetailRespVO;
import com.ideaaedi.zoo.example.springboot.bpmn.flowable.controller.demo4.entity.resp.DemoLeaveInfoListRespVO;

import javax.annotation.Nullable;
import java.util.Map;

/**
 * <p>
 * 请假申请 服务类
 * </p>
 *
 * @author Administrator
 * @since 1.0.0
 */
public interface DemoLeaveInfoService extends IService<DemoLeaveInfoPO> {

    /**
     * 新增申请（新增为草稿 或 直接发起申请）
     */
    @Nullable
    DemoLeaveInfoDetailRespVO add(DemoLeaveInfoAddReqVO req, boolean queryDetail);

    /**
     * 发起申请
     */
    DemoLeaveInfoDetailRespVO release(Long id);

    /**
     * 删
     *
     * @param id 要删除数据的id
     *
     * @return 删除了的数据详情
     */
    DemoLeaveInfoDetailRespVO delete(Long id);
    
    /**
     * 撤销（终止）
     *
     * @param id 要撤销（终止）数据的id
     *
     * @return 撤销（终止）了的数据详情
     */
    DemoLeaveInfoDetailRespVO terminate(Long id);

    /**
     * 改
     *
     * @param req 参数
     *
     * @return 修改后的数据详情
     */
    @Nullable
    DemoLeaveInfoDetailRespVO update(DemoLeaveInfoUpdateReqVO req);

    /**
     * 完成审批
     *
     * @param req 参数
     *
     * @return 完成审批后的数据详情
     */
    @Nullable
    DemoLeaveInfoDetailRespVO complete(DemoLeaveInfoCompleteReqVO req);

    /**
     * 查请假申请详情
     *
     * @param id 要查询数据的id
     *
     * @return 请假申请详情
     */
    @Nullable
    DemoLeaveInfoDetailRespVO applyDetail(Long id);
    
    /**
     * 查审批任务详情
     *
     * @param taskId 审批任务id
     *
     * @return 审批任务详情
     */
    Map<String, Object> taskDetail(String taskId);
    
    /**
     * 待处理任务列表
     *
     * @param req 参数
     *
     * @return 待处理任务列表
     */
    PageInfo<DemoLeaveInfoListRespVO> listTodoApply(DemoLeaveInfoListTodoTaskReqVO req);

    /**
     * 已处理任务列表
     *
     * @param req 参数
     *
     * @return 已处理任务列表
     */
    PageInfo<DemoLeaveInfoListRespVO> listDoneApply(DemoLeaveInfoListDoneTaskReqVO req);

    /**
     * 已发起列表
     *
     * @param req 参数
     *
     * @return 已发起列表
     */
    PageInfo<DemoLeaveInfoListRespVO> listLaunchApply(DemoLeaveInfoListLaunchTaskReqVO req);

    /**
     * 查列表
     *
     * @param req 参数
     *
     * @return 数据列表
     */
    PageInfo<DemoLeaveInfoListRespVO> list(DemoLeaveInfoListReqVO req);

}
